
def func1():
    language = "JS"
    def func2():
        language = "Python"
    func2()
    print(language) # JS

func1()



def access1():
    color = "red"
    def access2():
        # 能够访问父方法的变量
        print(color)